﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<CourseSystem.Core.Entities.ExaminationInfo>" %>
<%@ Import Namespace="Chowpoo.Util" %>
<% var type = ViewData["type"].CheckInt(0); %>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="table03">
    <tr class="box06">
        <td width="35%" align="center">
            正在设置<%=type<2?"章节":"课程" %><%=(type==0||type==2)?"练习":"作业" %>
        </td>
        <% if (type < 2)
           {
               if (type == 0)
               { %>
        <td width="10%" align="center">
            做题时间
        </td>
        <% }
               else
               {%>
        <td width="10%" align="center">
            提交日期
        </td>
        <% } %>
        <% } %>
        <td width="45%" align="center">
            操作
        </td>
    </tr>
    <tr class="box02" onmouseover="this.className='bg3'" onmouseout="this.className='bg4'"
        bgcolor="#FFFFFF">
        <td height="27" align="">
            <%=type<2? Model.SectionInfo.Name:"整门课程" %>
        </td>
        <% if (type < 2)
           {
               if (type == 0)
               { %>
        <td align="center">
            <%=Model.LimitTime%>分钟
        </td>
        <% }
               else
               {%>
        <td align="center">
            <%=Model.EndTime.ToString("yyyy-MM-dd HH:mm")%>
        </td>
        <% } %>
        <% } %>
        <td align="center">
            <%--<%=Html.ActionLink(Model.Status==0?"发布":"取消发布", "ExaminationPub", new {Model.Id })%>--%>
            <%-- <%=Html.ActionLink("更新分值", "ExaminationUpdateScore", new { Model.Id })%>--%>
             <%=Html.ActionLink("预览", "ExamDoView", new { Model.Id }, new { target = "_blank" })%>
            <% if (type < 2)
               { %><a onclick="editClickA('<%=Model.Id %>')" href="javascript:;">编辑</a>   <%} %>
            <% if (type == 0 || type == 2)
               { %>
            <%=Html.ActionLink("编辑单选题","ExaminationItem",new{eid=Model.Id,type=0}) %>
            <%=Html.ActionLink("编辑多选题","ExaminationItem",new{eid=Model.Id,type=1}) %>
            <%=Html.ActionLink("编辑判断题","ExaminationItem",new{eid=Model.Id,type=2}) %>
            <%}
               else if (type == 1 || type == 3)
               { %>
            <%= Html.ActionLink("编辑论述题", "ExaminationItem", new {eid = Model.Id, type = 3}) %>
            <%= Html.ActionLink("编辑思考题", "ExaminationItem", new {eid = Model.Id, type = 4}) %><% } %>
        </td>
    </tr>
</table>
